const mongoose = require("mongoose");

const { Schema, model } = mongoose;
const projectSchema = new Schema({
  name: {
    type: String,
    required: true,
  },
  code: {
    type: String,
    required: true,
  },
  type: {
    type: String,
  },
  apiUrl: {
    type: String,
    required: true,
  },
  template: {
    type: Number,
    required: true,
    default: 1,
  },
  createAt: {
    type: Date,
    default: Date.now,
  },
  updateAt: {
    type: Date,
    default: Date.now,
  },
});

module.exports = model("_Project", projectSchema, "project");
